<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
$return=array();
$item=$this->plugin_setting('setting');
$return['adv']=$item['hdps'];
if($_RQ['op']=='list'){
	$pindex = max(1, intval($_SESSION['page']));
	$psize = 15;
	$params=array('uniacid'=>$_SESSION['uniacid'],'type'=>1,'status'=>1);
	if(!empty($_RQ['title'])){
		$params['title like']='%'.trim($_RQ['title']).'%';
		$return['params']['title']=$_RQ['title'];
	}
	$fields=array('id','title','start','end','createtime','price','status','time','name','mobile','people','self');
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_cmspinche_list',$params,array($pindex,$psize),$total,$fields,'',$orderby);
	foreach($return['list'] as &$v){
		$v['createtime']=date('Y-m-d H:m:s',$v['createtime']);
		if($v['self']){
			$v['self']='拼座';
		}else{
			$v['self']='不拼座';
		}
		
	}
	//print_r($return['list']);exit();
	exi($return);
	}


?>